#ifndef FUSE_ENTRYPOINTS_H_
#define FUSE_ENTRYPOINTS_H_

// This file bridges between the C and C++ portions of the code.
//
// Put no C++ here!

#include <stdlib.h>
#include <fuse/fuse.h>

#ifdef __cplusplus
extern "C" {
#endif  // __cplusplus

struct timespec;

int tffs_getattr(const char *path, struct stat *stbuf);
int tffs_readlink(const char *path, char *buf, size_t bufsiz);
int tffs_mknod(const char *path, mode_t mode, dev_t dev);
int tffs_mkdir(const char *path, mode_t mode);
int tffs_unlink(const char *path);
int tffs_rmdir(const char *path);
int tffs_symlink(const char *linkdst, const char *linkname);
int tffs_chmod(const char *path, mode_t mode);
int tffs_chown(const char *path, uid_t owner, gid_t group);
int tffs_truncate(const char *path, off_t length);
int tffs_rename(const char *old, const char *new_name);
int tffs_link(const char *linkdst, const char *linkname);
int tffs_utimens(const char *path, const struct timespec ts[2]);
int tffs_open(const char *path, struct fuse_file_info* fi);
int tffs_read(const char *path, char *buf, size_t size, off_t offset,
              struct fuse_file_info *fi);
int tffs_write(const char *path, const char *buf, size_t size, off_t,
               struct fuse_file_info *fi);
int tffs_statvfs(const char *path, struct statvfs *buf);
int tffs_flush(const char *path, struct fuse_file_info *fi);
int tffs_release(const char *path, struct fuse_file_info *fi);
int tffs_fsync(const char *path, struct fuse_file_info *fi);
int tffs_setxattr(const char *path, const char *name,
		  const void *value, size_t size, int flags);
int tffs_getxattr(const char *path, const char *name,
		  void *value, size_t  size);
int tffs_listxattr(const char *path, char *list, size_t size);
int tffs_removexattr(const char *path, const char *name);
int tffs_opendir(const char *path, struct fuse_file_info *fi);
int tffs_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
                 off_t offset, struct fuse_file_info *fi);
int tffs_releasedir(const char *path, struct fuse_file_info *fi);
int tffs_fsyncdir(const char *path, struct fuse_file_info *fi);
int tffs_access(const char *path, int mode);
int tffs_create(const char *path, mode_t mode, struct fuse_file_info *fi);
int tffs_ftruncate(const char *path, off_t length, struct fuse_file_info *fi);
int tffs_fgetattr(const char *path, struct stat *stbuf, struct fuse_file_info *fi);

void set_target_dir(const char* path);
void set_mount_point(const char* path);
const char* get_target_dir();

#ifdef __cplusplus
}
#endif  // __cplusplus

#endif  // FUSE_ENTRYPOINTS_H_
